package com.sjjy.ta.impl;

import com.sjjy.ta.iface.UserInfoService;
import com.sys.plat.bean.PageBean;
import com.sys.plat.service.base.BaseServiceImpl;

/**
 * Created by IntelliJ IDEA.
 * User: mabo
 * Date: 11-3-10
 * Time: 下午11:45
 * To change this template use File | Settings | File Templates.
 */
public class UserInfoImpl extends BaseServiceImpl implements UserInfoService {
    public void fine(PageBean pageBean) {

        pageBean.setHql("FROM UserInfoView _t");

        String sort = "1";
        if (pageBean.getFiltermap().get("sort") != null && !pageBean.getFiltermap().get("sort").toString().equals("")) {
            sort = pageBean.getFiltermap().get("sort").toString();
        }
        pageBean.getFiltermap().remove("sort");

        if (sort.equals("1")) {
            pageBean.setProperty("uDate");
        } else if (sort.equals("2")) {
            pageBean.setProperty("iDate");
        } else if (sort.equals("3")) {
            pageBean.setProperty("oDate");
        }
        pageBean.setSortOrder("DESC");
        this.page(pageBean);

        pageBean.getFiltermap().put("sort", sort);
    }
}
